#ifndef __QTLOGGER_H__
#define __QTLOGGER_H__

#include "Utils/Logger/Logger.h"

class QTextEdit;

class QtLogger: public RayFrame::LogPolicy
{
public:
  QtLogger(QTextEdit *output);
  
  virtual void Create(STRING filename = NULL);
  virtual void Destroy();
  virtual void Write(STRING content, RayFrame::LogLevel level);
  virtual void WriteBanner(STRING content);

  void Enable(bool e = true){ m_enable = e; };
protected:
  virtual void internalCreate();
  virtual void internalDestroy();
protected:
  QTextEdit*  m_edit;
  bool        m_enable;
};

#endif
